<template>
  <div class="mersan">
    <div class="shuosuo">
      <el-select v-model="value" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
          :disabled="item.disabled"
          
        >
        </el-option>
      </el-select>
      <el-button type="primary" icon="el-icon-search">搜索</el-button>
      <el-button type="success"
        ><i class="el-icon-upload el-icon-plus"></i>上传</el-button
      >
    </div>
    <!-- 表格 -->
    <el-table
      ref="multipleTable"
      :data="tableData"
      tooltip-effect="dark"
      style="width: 100%;"

      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="55"> </el-table-column>
    
    
    
      <el-table-column prop="name" label="编号/名称" width="120"> </el-table-column>
      <el-table-column prop="name" label="编号/类型" width="250"> </el-table-column>
      <el-table-column prop="name" label="图标" width="250">qa </el-table-column>
      <el-table-column prop="name" label="图片" width="120">- </el-table-column>
      <el-table-column prop="name" label="状态" width="120">  <el-tag type="success">启用</el-tag></el-table-column>
   
  <el-table-column prop="action" label="操作" width="200px">
    <template slot-scope="scope">
      <el-button type="primary" size="mini" @click="edla(scope.row.id)"
        >编辑</el-button
      >
      <el-button type="danger" size="mini" @click="edlb(scope.row.id)"
        >删除</el-button
      >
    </template>
  </el-table-column>

    </el-table>
       <div class="block">
   <el-pagination
     @size-change="handleSizeChange"
     @current-change="handleCurrentChange"
     :current-page="currentPage4"
     :page-sizes="[100, 200, 300, 400]"
     :page-size="100"
     layout="total, sizes, prev, pager, next, jumper"
     :total="400">
   </el-pagination>
 </div>
  </div>
</template>
<script>
import fenleguanyi from "@/api";

export default {
  data() {
    return {
      form: {},
      value: "",
      scope:'',
      multipleSelection: [],
      options: [
      ],
      tableData: [
      ],
    };
  },

  methods: {
    // 表格
    handleEdit(index, row) {
      console.log(index, row);
    },
    handleDelete(index, row) {
      console.log(index, row);
    },

    fenleguanyi() {
      fenleguanyi(params).then((res) => {
        console.log(res);
      });
    },

    toggleSelection(rows) {
      if (rows) {
        rows.forEach((row) => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      }
  },
};
</script>
<style scoped>
* {
  padding: 0;
  margin: 0;
}
body {
  background-color: #fff;
}
.mersan {
  overflow: hidden;

}
.shuosuo {
  width: 100%;
  height: 50px;
  /* position: absolute; */
  /* top: -63px; */
  /* left: 0; */
  /* z-index: 55; */
  /* display: flex; */
}
</style>
<style scoped>
.element {
  margin-left: 0;
}
</style>
